package com.meilele.dao.guoziyang;

import com.meilele.entity.guoziyang.SecBigYpe;
import org.apache.ibatis.annotations.*;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

@MapperScan
public interface SecBigYpeMapper {
    @Delete({
        "delete from sec_big_ype",
        "where type_id = #{typeId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer typeId);

    @Insert({
        "insert into sec_big_ype (type_id, type_name)",
        "values (#{typeId,jdbcType=INTEGER}, #{typeName,jdbcType=VARCHAR})"
    })
    int insert(SecBigYpe record);

    int insertSelective(SecBigYpe record);

    @Select({
        "select",
        "type_id, type_name",
        "from sec_big_ype",
        "where type_id = #{typeId,jdbcType=INTEGER}"
    })
    @ResultMap("com.meilele.dao.guoziyang.SecBigYpeMapper.BaseResultMap")
    SecBigYpe selectByPrimaryKey(Integer typeId);

    int updateByPrimaryKeySelective(SecBigYpe record);

    @Update({
        "update sec_big_ype",
        "set type_name = #{typeName,jdbcType=VARCHAR}",
        "where type_id = #{typeId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(SecBigYpe record);

    @Select({
            "select",
            "type_id, type_name",
            "from sec_big_ype"
    })
    @ResultMap("com.meilele.dao.guoziyang.SecBigYpeMapper.BaseResultMap")
    List<SecBigYpe> selectAll();
}